#region

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

#endregion

namespace CuongHanh.Models
{
    [Table("tbl_StyleImage")]
    public class StyleImage
    {
        [Key]
        [Column(Order = 0)]
        public int StyleId { get; set; }

        [Key]
        [Column(Order = 1)]
        public int MaterialId { get; set; }

        //check insert stoneId duplicate
        public int? StoneId { get; set; }

        public string Image { get; set; }

        #region Function

        public StyleImage()
        {
        }

        public StyleImage(StyleImage model)
        {
            StyleId = model.StyleId;
            MaterialId = model.MaterialId;
            StoneId = model.StoneId;
            Image = model.Image;
        }

        public void UpdateInfo(StyleImage model)
        {
            StyleId = model.StyleId;
            MaterialId = model.MaterialId;
            StoneId = model.StoneId;
            Image = model.Image;
        }

        #endregion
    }
}
